package org.wuliu.pojo;

import java.util.List;

public class Perm {
    private Integer id;
    private String name;
    private Integer parentId;
    private String url;
    private Integer disorder;
    private String persVar;
    private String type;
    private List<Perm> children;

    public List<Perm> getChildren() {
        return children;
    }

    public void setChildren(List<Perm> children) {
        this.children = children;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPerntId() {
        return parentId;
    }

    public void setPerntId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getDisorder() {
        return disorder;
    }

    public void setDisorder(Integer disorder) {
        this.disorder = disorder;
    }

    public String getPersVar() {
        return persVar;
    }

    public void setPersVar(String persVar) {
        this.persVar = persVar;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Perm perm = (Perm) o;

        if (id != null ? !id.equals(perm.id) : perm.id != null) return false;
        if (name != null ? !name.equals(perm.name) : perm.name != null) return false;
        if (parentId != null ? !parentId.equals(perm.parentId) : perm.parentId != null) return false;
        if (url != null ? !url.equals(perm.url) : perm.url != null) return false;
        if (disorder != null ? !disorder.equals(perm.disorder) : perm.disorder != null) return false;
        if (persVar != null ? !persVar.equals(perm.persVar) : perm.persVar != null) return false;
        if (type != null ? !type.equals(perm.type) : perm.type != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (parentId != null ? parentId.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (disorder != null ? disorder.hashCode() : 0);
        result = 31 * result + (persVar != null ? persVar.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        return result;
    }
}
